package Test_2;

import java.util.Scanner;

public class Compony_test {
    public static void main(String[] args) {
        Compony p=new Compony();
        p.name="华为";
        p.address="临泉路88号";
        p.phone="8888888";
        p.jinyingfanw="手机";
        Scanner in=new Scanner(System.in);
        while (true){
            System.out.println("公司信息请按1");
            System.out.println("新增加员工请按2");
            System.out.println("员工信息请按3");
            System.out.println("退出请按0");
            switch (in.nextInt()){
                case 1:
                    p.show();
                    break;
                case 2:
                    System.out.println("请输入新员工名字");
                    p.add(in.next());
                    break;
                case 3:
                    String sName=p.information();
                    System.out.println(sName);
                    break;
                case 0:
                    return;
            }
        }
    }
}
